package cn.com.nes.site.controller.workOrder;

import cn.com.nes.common.web.CommonResult;
import cn.com.nes.site.entity.vo.workOrder.QueryCancelRecordsPageVO;
import cn.com.nes.site.service.workOrder.WorkOrderCancelRecordService;
import cn.com.nes.site.service.workOrder.bo.QueryCancelRecordsPageBO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.stereotype.Controller;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

@Api(tags = {"项目模块 - 安装工单撤回记录管理"})
@Controller
@RequestMapping("/v2/order/work/cancelRecord")
public class WorkOrderCancelRecordController {

    @Resource
    private WorkOrderCancelRecordService workOrderCancelRecordService;

    @ApiOperation("查询安装工单撤回记录")
    @RequestMapping(value = "/queryCancelRecordPage", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<?> queryCancelRecordPage(@Validated QueryCancelRecordsPageVO vo) {
        return workOrderCancelRecordService.queryCancelRecordPage(vo.convertToBo(QueryCancelRecordsPageBO.class));
    }

}
